package com.kaili.basic.mapper;



import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.kaili.basic.pojo.dto.WellenAndPickManagedto;
import com.kaili.basic.pojo.dto.Wellendto;
import com.kaili.basic.pojo.entity.PickManage;
import com.kaili.basic.pojo.entity.Wellen;
import com.kaili.basic.pojo.entity.WellenPick;
import com.kaili.basic.pojo.entity.WellenProduct;
import com.kaili.basic.pojo.vo.OutApplicationFormVO;
import com.kaili.basic.pojo.vo.OutApplicationProductVO;
import com.kaili.basic.pojo.vo.WellenVo;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface PickManageMapper {

    /*添加波次单记录*/

    void createWellen(Wellen wellen);

    /*查询出库申请单*/
    public List<PickManage> queryOutApplicationByPage(Pagination pages, PickManage pickManage);

    List<OutApplicationProductVO> queryOutApplicationProduct(Integer applyId);

    int getWellenNum();

    /*创建波次单产品*/
    void createWellenProduct(WellenProduct productVO);


    void updateOutApplication(Map<String,Object> params);

    /*根据出库申请单ID查询是否存在波次单号*/
    Integer getWellenNoByApplyId(Integer applyId);

    /*根据分页条件查询波次单*/

    List<WellenVo> queryWellenByPages(Page<WellenVo> pages, WellenVo wellenVo);


    /*根据导出条件查询波次单*/

    List<WellenVo> queryWellenByExport(WellenVo wellenVo);



    /*根据波次单ID删除波次单产品*/
    void deleteWellenProductByWellenId(Long wellenId);

    /*根据波次单ID删除波次单拣货单*/
    void deleteWellenPickByWellenId(Long wellenId);

    /*根据波次单ID删除波次单*/
    void deleteWellenByWellenId(Long wellenId);

    /*根据波次单ID修改波次单状态*/
    void updateWellenById(Wellendto wellendto);

    /*根据波次单ID查询产品*/
    List<WellenProduct> getWellenProductByWellenId(Integer wellen_id);

    Integer getWellenById(Integer wellenId);

    Integer getlocatorIdByDepotId(Map<String,Object> params);

    /*创建波次单拣货单记录*/
    void createWellenPick(WellenPick wellenPick);


    /*二次分拣根据分页条件查询波次单*/

    List<WellenVo> queryTwoWellenByPages(Page<WellenVo> pages, WellenVo wellenVo);

    /*二次分拣根据条件查询波次单*/
    List<WellenVo> queryTwoWellenByExcport(WellenVo wellenVo);

    /*波次id查询正在进行中的操作*/
    Integer getWellenOperationCount(Integer welleId);
}
